package com.sumainfor.pc.market.controller.rentadviser;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.service.RdHousingDoubtService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.io.Serializable;
import java.util.Map;

/**
 * @Date 2018年11月7日
 * @Describe 房源存在疑问
 */
@RestController
@RequestMapping("/rentadviser/RdHousingDoubtController")
public class RdHousingDoubtController implements Serializable {
    @Autowired
    private RdHousingDoubtService rdHousingDoubtService;
    /**
     * 新增房源存在疑问
     */
    @PostMapping("/addHousingDoubt")
    public JsonResult addHousingDoubt (@RequestBody Map<String,Object> params) {
        JsonResult result = new JsonResult();
        int count=rdHousingDoubtService.addHousingDoubt(params);
        if (count>0){
            result.putSuccess("新增成功");
        }else{
            result.putFailed("服务器繁忙");
        }
        return result;
    }
}
